<!DOCTYPE html>
<html lang='en'>
<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width, initial-scale=1.0'>
    <title>Document</title>
    <script type='text/javascript' src='js/vue.js'></script>

    <script src="./js/axios.js"></script>


</head>
<body>
    <div id='app'>
        {{msg}}
    </div>
    <script type='text/javascript'>
axios.defaults.baseURL = 'http://127.0.0.1:3000';
axios.interceptors.response.use(function (response) {
    // 对响应数据做点什么
    return response.data;
  }, function (error) {
    // 对响应错误做点什么
    return Promise.reject(error);
  });

        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'Hello Vue'
            },
            created() {
               axios("/books").then(res=>{
                   console.log(res,6666);
                   
               })
                
            },
        });
    </script>
</body>
</html>